package com.yitong;

import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;

public class demo4 {
    public static void main(String[] args) throws IOException {
        ServerSocket ss =new ServerSocket(10000);

        InputStream is = ss.accept().getInputStream();

        byte [] bys =new byte[1024];

        int len = is.read(bys);

        System.out.println("数据是："+new String(bys,0,len));

        ss.close();
    }
}
